<div class="al-modal-view">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" ng-click="cancel()">
      <span aria-hidden="true" class="glyphicon glyphicon-remove"></span>
      <span class="sr-only">Close</span>
    </button>
    <h4 class="modal-title ok-color">绑定角色</h4>
  </div>
  <div class="modal-body">
    <form class="form-horizontal al-search-container" role="form">
      <div class="form-group">
        <label class="col-sm-2 control-label">角色名称</label>
        <div class="col-sm-4">
          <input class="form-control" ng-model="search.name" type="text" placeholder=""/>
        </div>
        <label class="col-sm-2 control-label">类型</label>
        <div class="col-sm-2">
          <select ng-model="search.type" class="form-control"
                  ng-options="item.value as item.name for item in typeList">
          </select>
        </div>
        <div class="col-sm-2">
          <button type="button" ng-click="queryData()" class="btn btn-success al-float-right">查询</button>
        </div>
      </div>
    </form>
    <table ng-table="tableParams"
               class="table  table-bordered table-striped table-condensed al-table-container">
    <thead>
    <tr>
      <td>选择</td>
      <th>角色名称</th>
      <th>描述</th>
      <th>类型</th>
      <th>状态</th>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="item in $data">
      <td>
        <input ng-disabled="chkBox.disabled[item.id]" type="checkbox" ng-model="chkBox.ids[item.id]" ng-change="pickData(item)"/>
      </td>
      <td>{{item.name}}</td>
      <td>{{item.description}}</td>
      <td>{{item.type|constantTransfer:typeList}}</td>
      <td>{{item.enabled|constantTransfer:enabledList}}</td>
    </tr>
    </tbody>
  </table>
  </div>
  <div class="modal-footer">
    <button class="btn btn-warning no-border" type="button" ng-click="cancel()">取消</button>
    <button class="btn btn-primary no-border" type="button" ng-click="confirm()" ng-disabled="modalForm.$invalid">确定</button>
  </div>
</div>